export type LayoutType = "vertical" | "classic" | "transverse" | "columns";

export type AssemblySizeType = "large" | "default" | "small";

export type LanguageType = "zh" | "en" | null;

/* GlobalState */
export interface GlobalState {
  title: string;
  layout: LayoutType;
  assemblySize: AssemblySizeType;
  language: LanguageType;
  maximize: boolean;
  primary: string;
  isDark: boolean;
  isGrey: boolean;
  isWeak: boolean;
  asideInverted: boolean;
  isCollapse: boolean;
  breadcrumb: boolean;
  breadcrumbIcon: boolean;
  tabs: boolean;
  tabsIcon: boolean;
  footer: boolean;
}

export interface UserPermission {
  permissions: string[];
  roles: string[];
  user: {
    [key: string]: string;
  };
}
export interface UserInfo {
  avatar?: string;
  createBy?: string;
  createTime?: Date | string;
  delFlag?: number;
  dept?: SysDept;
  deptId?: number;
  email?: string;
  loginDate?: Date | string;
  loginIp?: string;
  nickName?: string;
  params?: { [key: string]: any };
  password?: string;
  phonenumber?: string;
  postIds?: number[];
  remark?: string;
  roleId?: number;
  roleIds?: number[];
  roles?: SysRole[];
  sex?: number;
  status?: number;
  updateBy?: string;
  updateTime?: Date;
  userId?: number;
  userName?: string;
  [property: string]: any;
}

/**
 * SysDept
 */
export interface SysDept {
  ancestors?: string;
  children?: SysDept[];
  createBy?: string;
  createTime?: Date;
  delFlag?: number;
  deptId?: number;
  deptName?: string;
  email?: string;
  leader?: string;
  orderNum?: number;
  params?: { [key: string]: any };
  parentId?: number;
  parentName?: string;
  phone?: string;
  remark?: string;
  status?: number;
  updateBy?: string;
  updateTime?: Date;
  [property: string]: any;
}

/**
 * SysRole
 */
export interface SysRole {
  createBy?: string;
  createTime?: Date;
  dataScope?: number;
  delFlag?: number;
  deptCheckStrictly?: boolean;
  deptIds?: number[];
  flag?: boolean;
  menuCheckStrictly?: boolean;
  menuIds?: number[];
  params?: { [key: string]: any };
  permissions?: string[];
  remark?: string;
  roleId?: number;
  roleKey?: string;
  roleName?: string;
  roleSort?: number;
  status?: number;
  updateBy?: string;
  updateTime?: Date;
  [property: string]: any;
}
/* UserState */
export interface UserState {
  token: string;
  userInfo: UserInfo;
  permissionInfo: UserPermission;
}

// TenantState
export interface TenantState {
  info: {
    accountCount: number;
    code: string;
    contactMobile: string;
    contactName: string;
    createTime: Date;
    description: string;
    domain: string;
    expireTime: Date;
    id: number;
    isInternational: boolean;
    name: string;
    packageId: number;
    publicClass: boolean;
    shortName: string;
    status: number;
    teachingClass: boolean;
  };
}

/* tabsMenuProps */
export interface TabsMenuProps {
  icon: string;
  title: string;
  path: string;
  name: string;
  close: boolean;
}

/* TabsState */
export interface TabsState {
  tabsMenuList: TabsMenuProps[];
}

/* AuthState */
export interface AuthState {
  routeName: string;
  authButtonList: string[];
  authMenuList: Menu.MenuOptions[];
  showMenuList: Menu.MenuOptions[];
  curMenuList: Menu.MenuOptions[];
}

/* KeepAliveState */
export interface KeepAliveState {
  keepAliveName: string[];
}

export interface DictsProps {
  colorType: string;
  cssClass: string;
  dictType?: string;
  label: string;
  status: number;
  value: string;
}

export interface DictsState {
  allDicts: {
    [key: string]: DictsProps[];
  };
}
